<?= $this->partial('user/morelayout.phtml', array(
									'uid' => $this->uid, 
									'type' => $this->type,
									'myaction' => $this->myaction
									)
	); 
?>
<div class="frame_introDiv">
	<form name="userForm" id="userForm" method="post" >
	  <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#c8d9e9">
		<tr>
		  <td width="27%" class="ri-bbgg"> 消费券：</td>
		  <td width="73%" class="le">$USD <?=$this->memberArray[0]['my_coupon']?></td>
		</tr>
		<tr>
		  <td width="27%" class="ri-bbgg"> 扣减消费券：</td>
		  <td width="73%" class="le"><input type="text" value="" name="sub_coupon" /> <input onclick="changeCoupon('sub',this)" type="button" value="扣减" /></td>
		</tr>
		<tr>
		  <td width="27%" class="ri-bbgg"> 奖励消费券：</td>
		  <td width="73%" class="le"><input type="text" value="" name="add_coupon" /> <input onclick="changeCoupon('add',this)" type="button" value="奖励" /></td>
		</tr>
		<tr>
		  <td width="27%" class="ri-bbgg"> 虚拟货币：</td>
		  <td width="73%" class="le"><?=$this->memberArray[0]['virtual']?></td>
		</tr>
		<tr>
		  <td width="27%" class="ri-bbgg"> 扣减虚拟货币：</td>
		  <td width="73%" class="le"><input type="text" value="" name="sub_virtual" /> <input onclick="changeVirtual('sub',this)" type="button" value="扣减" /></td>
		</tr>
		<tr>
		  <td width="27%" class="ri-bbgg"> 奖励虚拟货币：</td>
		  <td width="73%" class="le"><input type="text" value="" name="add_virtual" /> <input onclick="changeVirtual('add',this)" type="button" value="奖励" /></td>
		</tr>
		<tr>
		  <td width="27%" class="ri-bbgg"> 积分：</td>
		  <td width="73%" class="le"><?=$this->memberArray[0]['integration']?></td>
		</tr>
		<tr>
		  <td width="27%" class="ri-bbgg"> 扣减积分：</td>
		  <td width="73%" class="le"><input type="text" value="" name="sub_integration" /> <input onclick="changeIntegration('sub',this)" type="button" value="扣减" /></td>
		</tr>
		<tr>
		  <td width="27%" class="ri-bbgg"> 奖励积分：</td>
		  <td width="73%" class="le"><input type="text" value="" name="add_integration" /> <input onclick="changeIntegration('add',this)" type="button" value="奖励" /></td>
		</tr>
	  </table>
	 </form>
</div>
<script>
function changeVirtual(type,thisInput){
	if(!numTest($(thisInput).prev().val())){
		alert("请正确输入要更改的虚拟货币！");
		return false;
	}
	if(confirm("确定要更改用户的虚拟货币吗？")){
		$('#userForm').attr('action','administrator-give-changevirtual?type='+type+'&uid=<?=$this->uid?>');
		$('#userForm').submit();
	}
}
function changeCoupon(type,thisInput){
	if(!numTest($(thisInput).prev().val())){
		alert("请正确输入要更改的消费券！");
		return false;
	}
	if(confirm("确定要更改用户的消费券吗？")){
		$('#userForm').attr('action','administrator-give-changecoupon?type='+type+'&uid=<?=$this->uid?>');
		$('#userForm').submit();
	}
}
function changeIntegration(type,thisInput){
	if(!numTest($(thisInput).prev().val())){
		alert("请正确输入要更改的积分！");
		return false;
	}
	if(confirm("确定要更改用户的积分吗？")){
		$('#userForm').attr('action','administrator-give-changeintegration?type='+type+'&uid=<?=$this->uid?>');
		$('#userForm').submit();
	}
}
</script>